package com.acme.task2;

public class Foo {

    int id;

    public Foo(int i) {
         id = i;
    }

    @Override
	protected void finalize() throws Throwable {
		//print to console that finalize() was called
		super.finalize();
        System.out.println("finalize id = " + id);
	}
}
